" vim and open grep results
function! VimAndOpenFunction()
  " wrapping is evil
  set nowrap
  " remove leading ./
  %s/^\.\///
  " remove console colored output
  %s/\V[\d\d;\d\dm[K//
  %s/\V[\d\dm[K//
  %s/\V[m[K//
  " delete everything after colon and include
  %s/\v:.*$//
  " sort and remove duplicates
  sort u
  " prepend every line
  g/./normal I | e 
  " first command is to delete buffer
  let @p='bd!'
  " append every line
  g/./normal 0v$h"Py
  " execute
  @p
endfunction
